/**
 */
package org.mro.grib.model.files.secondEdition.grids;

import java.util.Arrays;
import java.util.Collections;
import java.util.List;

import org.eclipse.emf.common.util.Enumerator;

/**
 * <!-- begin-user-doc -->
 * A representation of the literals of the enumeration '<em><b>Source Of Grid Definition</b></em>',
 * and utility methods for working with them.
 * <!-- end-user-doc -->
 * @see org.mro.grib.model.files.secondEdition.grids.GridsPackage#getSourceOfGridDefinition()
 * @model annotation="http://www.eclipse.org/emf/2002/GenModel description_en='Code table 3.0 \u2013 Source of grid definition'"
 * @generated
 */
public enum SourceOfGridDefinition implements Enumerator {
	/**
	 * The '<em><b>SPECIFIED IN CODE TABLE 31</b></em>' literal object.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #SPECIFIED_IN_CODE_TABLE_31_VALUE
	 * @generated
	 * @ordered
	 */
	SPECIFIED_IN_CODE_TABLE_31(0, "SPECIFIED_IN_CODE_TABLE_3_1", "SPECIFIED_IN_CODE_TABLE_3_1"), //$NON-NLS-1$ //$NON-NLS-2$

	/**
	 * The '<em><b>PREDETERMINED GRID DEFINITION</b></em>' literal object.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #PREDETERMINED_GRID_DEFINITION_VALUE
	 * @generated
	 * @ordered
	 */
	PREDETERMINED_GRID_DEFINITION(1, "PREDETERMINED_GRID_DEFINITION", "PREDETERMINED_GRID_DEFINITION"), //$NON-NLS-1$ //$NON-NLS-2$

	/**
	 * The '<em><b>AGRID DEFINITION DOEST NOT APPLY TO THIS PRODUCT</b></em>' literal object.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #AGRID_DEFINITION_DOEST_NOT_APPLY_TO_THIS_PRODUCT_VALUE
	 * @generated
	 * @ordered
	 */
	AGRID_DEFINITION_DOEST_NOT_APPLY_TO_THIS_PRODUCT(255, "A_GRID_DEFINITION_DOEST_NOT_APPLY_TO_THIS_PRODUCT", "A_GRID_DEFINITION_DOEST_NOT_APPLY_TO_THIS_PRODUCT"); //$NON-NLS-1$ //$NON-NLS-2$

	/**
	 * The '<em><b>SPECIFIED IN CODE TABLE 31</b></em>' literal value.
	 * <!-- begin-user-doc -->
	 * <p>
	 * If the meaning of '<em><b>SPECIFIED IN CODE TABLE 31</b></em>' literal object isn't clear,
	 * there really should be more of a description here...
	 * </p>
	 * <!-- end-user-doc -->
	 * @see #SPECIFIED_IN_CODE_TABLE_31
	 * @model name="SPECIFIED_IN_CODE_TABLE_3_1"
	 *        annotation="http://www.eclipse.org/emf/2002/GenModel description_en='Specified in Code table 3.1'"
	 * @generated
	 * @ordered
	 */
	public static final int SPECIFIED_IN_CODE_TABLE_31_VALUE = 0;

	/**
	 * The '<em><b>PREDETERMINED GRID DEFINITION</b></em>' literal value.
	 * <!-- begin-user-doc -->
	 * <p>
	 * If the meaning of '<em><b>PREDETERMINED GRID DEFINITION</b></em>' literal object isn't clear,
	 * there really should be more of a description here...
	 * </p>
	 * <!-- end-user-doc -->
	 * @see #PREDETERMINED_GRID_DEFINITION
	 * @model annotation="http://www.eclipse.org/emf/2002/GenModel comment_en='Defined by originating centre' description_en='Predetermined grid definition'"
	 * @generated
	 * @ordered
	 */
	public static final int PREDETERMINED_GRID_DEFINITION_VALUE = 1;

	/**
	 * The '<em><b>AGRID DEFINITION DOEST NOT APPLY TO THIS PRODUCT</b></em>' literal value.
	 * <!-- begin-user-doc -->
	 * <p>
	 * If the meaning of '<em><b>AGRID DEFINITION DOEST NOT APPLY TO THIS PRODUCT</b></em>' literal object isn't clear,
	 * there really should be more of a description here...
	 * </p>
	 * <!-- end-user-doc -->
	 * @see #AGRID_DEFINITION_DOEST_NOT_APPLY_TO_THIS_PRODUCT
	 * @model name="A_GRID_DEFINITION_DOEST_NOT_APPLY_TO_THIS_PRODUCT"
	 *        annotation="http://www.eclipse.org/emf/2002/GenModel description_en='A grid definition does not apply to this product'"
	 * @generated
	 * @ordered
	 */
	public static final int AGRID_DEFINITION_DOEST_NOT_APPLY_TO_THIS_PRODUCT_VALUE = 255;

	/**
	 * An array of all the '<em><b>Source Of Grid Definition</b></em>' enumerators.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	private static final SourceOfGridDefinition[] VALUES_ARRAY =
		new SourceOfGridDefinition[] {
			SPECIFIED_IN_CODE_TABLE_31,
			PREDETERMINED_GRID_DEFINITION,
			AGRID_DEFINITION_DOEST_NOT_APPLY_TO_THIS_PRODUCT,
		};

	/**
	 * A public read-only list of all the '<em><b>Source Of Grid Definition</b></em>' enumerators.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public static final List<SourceOfGridDefinition> VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY));

	/**
	 * Returns the '<em><b>Source Of Grid Definition</b></em>' literal with the specified literal value.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public static SourceOfGridDefinition get(String literal) {
		for (int i = 0; i < VALUES_ARRAY.length; ++i) {
			SourceOfGridDefinition result = VALUES_ARRAY[i];
			if (result.toString().equals(literal)) {
				return result;
			}
		}
		return null;
	}

	/**
	 * Returns the '<em><b>Source Of Grid Definition</b></em>' literal with the specified name.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public static SourceOfGridDefinition getByName(String name) {
		for (int i = 0; i < VALUES_ARRAY.length; ++i) {
			SourceOfGridDefinition result = VALUES_ARRAY[i];
			if (result.getName().equals(name)) {
				return result;
			}
		}
		return null;
	}

	/**
	 * Returns the '<em><b>Source Of Grid Definition</b></em>' literal with the specified integer value.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public static SourceOfGridDefinition get(int value) {
		switch (value) {
			case SPECIFIED_IN_CODE_TABLE_31_VALUE: return SPECIFIED_IN_CODE_TABLE_31;
			case PREDETERMINED_GRID_DEFINITION_VALUE: return PREDETERMINED_GRID_DEFINITION;
			case AGRID_DEFINITION_DOEST_NOT_APPLY_TO_THIS_PRODUCT_VALUE: return AGRID_DEFINITION_DOEST_NOT_APPLY_TO_THIS_PRODUCT;
		}
		return null;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	private final int value;

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	private final String name;

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	private final String literal;

	/**
	 * Only this class can construct instances.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	private SourceOfGridDefinition(int value, String name, String literal) {
		this.value = value;
		this.name = name;
		this.literal = literal;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public int getValue() {
	  return value;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public String getName() {
	  return name;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public String getLiteral() {
	  return literal;
	}

	/**
	 * Returns the literal value of the enumerator, which is its string representation.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public String toString() {
		return literal;
	}
	
} //SourceOfGridDefinition
